Skip to content

Conversation

hasanmo
Copy link
Member

@hasanmo hasanmo commented Sep 15, 2026

Issue 5 – Implement weatherService

Change

The application needed a single place for retrieving and converting weather data. React components should not need to understand the original Open-Meteo response format.

This change adds a weatherService that:

  • fetches current weather data from Open-Meteo
  • uses city coordinates to build the request
  • checks the HTTP response
  • converts the API response to the project's WeatherData type
  • throws an error when the request fails
  • does not cache or persist weather data

React components can now retrieve weather data using:

const weather = await getWeather(city);

Closes #6

@hasanmo hasanmo requested a review from a team as a code owner September 15, 2026 07:12
@hasanmo hasanmo linked an issue Sep 15, 2026 that may be closed by this pull request
6 tasks
Copy link
Member

@oliveror oliveror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Over all, the PR seems good to me, but I have added a couple suggestions for more accurate documentation.

hasanmo and others added 3 commits September 15, 2026 11:09
Co-authored-by: Oliver Ørjavik <oliveror@stud.ntnu.no>
Co-authored-by: Oliver Ørjavik <oliveror@stud.ntnu.no>
@hasanmo hasanmo merged commit 2344f5d into dev Sep 15, 2026
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue 5: Implementere weatherService
4 participants